package com.lc.rabbit.mq.consumer;

import com.lc.rabbit.config.RabbitMqConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @description: some desc
 * @author: LChuang
 * @date: 2023/10/24 9:28
 */
@Slf4j
@Component
@RabbitListener(queues = {RabbitMqConstant.PUBLISH_01_TOPIC})
public class PublishQueueConsumer01 {

    @RabbitHandler
    public void process(Map<String, Object> map){
        log.info("{}队列，[消费者-main]消费信息：{}", RabbitMqConstant.PUBLISH_01_TOPIC, map.toString());
    }

}
